package com.expert.miniapp.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * LoginResponse - 登录响应DTO
 * 返回给前端的登录信息
 *
 * @author System
 * @since 2025-01-14
 */
@Data
public class LoginResponse {

    /**
     * JWT Token
     */
    @JsonProperty("token")
    private String token;

    /**
     * 是否为新用户
     */
    @JsonProperty("isNewUser")
    private Boolean isNewUser;

    /**
     * 用户信息
     */
    @JsonProperty("userInfo")
    private UserDTO userInfo;

    public LoginResponse() {
    }

    public LoginResponse(String token, Boolean isNewUser, UserDTO userInfo) {
        this.token = token;
        this.isNewUser = isNewUser;
        this.userInfo = userInfo;
    }
}
